#ifndef __ITEM_H__
#define __ITEM_H__

#include <string>
#include "Range.h"

/**
 *  @file
 *  Class "Item"
 */

/** 
 * Enum of the different type of items
 * 
 */
enum {
	ITEM_TYPE_UNKNOWN,
	ITEM_TYPE_ARMOR,
	ITEM_TYPE_ONEHANDEDWEAPON,
	ITEM_TYPE_TWOHANDEDWEAPON
};


/** 
 * enum of where to equip the items
 * 
 */
enum {
	ITEM_EQUIP_BACKPACK,
	ITEM_EQUIP_RIGHTHAND,
	ITEM_EQUIP_LEFTHAND,
	ITEM_EQUIP_BODY
};


/** 
 * Item class
 * Can be an armor or a weapon
 */
class Item
{
public:
	Item();
	Item(std::string name, 
		 std::string desc,
		 int type,
		 int price,
		 int damage,
		 int armorBypassLow,
		 int armorBypassHigh,
		 int armorFactor);
	~Item();

	Item&			operator=(const Item& itemToCopy);

	void			setName(std::string val);
	void			setDesc(std::string val);
	void			setType(int val);
	void			setPrice(int val);
	void			setDamage(int val);
	void			setBypassRoll(int low, int high);
	void			setArmorFactor(int val);
	int				getType();

	void			print();
	void			miniPrint();

	int				getId();
	std::string		getName();
	std::string		getDesc();
	int				getPrice();
	int				getDamage();
	int				getBypassRoll();
	int				getBypassRollLow();
	int				getBypassRollHigh();
	int				getArmorFactor();

private:
	std::string		m_strName;				//!< Name of the Item
	std::string		m_strDesc;				//!< Description of the Item
	int				m_iType;				//!< Type of the Item
	int				m_iPrice;				//!< Price of the Item
	int				m_iDamage;				//!< Damage a weapon can inflict
	Range			m_iArmorBypass;			//!< Armor bypass information for a weapon
	int				m_iArmorFactor;			//!< Armor factor
	int				m_id;					//!< Unique ID
	static int		m_staticID;				//!< Incremented ID

	int				getNextID();
};


/** 
 * Structure
 * This structure is temporary when Program initiate
 * It is used to load items for a monster
 */
struct	s_ItemsForMonster
{
		char*	m_monster_name;
		char*	m_item_name;
		int		m_equiped;
};



#endif // __ITEM_H__